/*
 * Copyright (c) 2012,东方口岸科技有限公司
 * All rights reserved.
 * 文件名称：RouterInfoService.java
 * 摘    要：
 * 版本：1.0
 * 作    者：fengzhiyong
 */
package com.cneport.transfer.router.support.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.cneport.transfer.router.model.Router;
import com.cneport.transfer.router.support.mapper.RouterMapper;

@Component
public class RouterService {
    /**
     *@CreateDate:2012-7-5
     *@Description:
     */
    @Autowired
    private RouterMapper routerMapper;

    public int insertRouter(List<Router> routerInfoList) {
        int insertNum = 0;
        for (Router router : routerInfoList) {
            insertNum = insertNum + routerMapper.insertRouter(router);
        }
        return insertNum;
    }

    public int deleteRouter(String routerType) {
        int deleteNum = 0;
        deleteNum = routerMapper.deleteRouter(routerType);
        return deleteNum;
    }
    
    public String queryExpression(Router router){
        return routerMapper.queryExpression(router);
    }
}
